'''
Created on Jul 18, 2012

@author: cdleslie
'''

class Weapon:
    def __init__(self,name,weaponStrength,weaponMaxAmmo,weaponHits,weaponClass,weaponEvasion,weaponHitChance,weaponCritChance):
        self.name=name
        self.weaponCritChance=weaponCritChance
        self.weaponStrength=weaponStrength
        self.weaponMaxAmmo=weaponMaxAmmo
        self.weaponHits=weaponHits
        self.currentAmmo=self.weaponMaxAmmo
        self.weaponClass=weaponClass
        self.weaponEvasion=weaponEvasion
        self.weaponHitChance=weaponHitChance

    def getWeaponCritChance(self):
        return(self.weaponCritChance)
    def getWeaponClass(self):
        return(self.weaponClass)
    def getWeaponEvasion(self):
        return(self.weaponEvasion)
    def getWeaponHitChance(self):
        return(self.weaponHitChance)
    def getName(self):
        return(self.name)
    def getStrength(self):
        return(self.weaponStrength)
    def getMaxAmmo(self):
        return(self.weaponMaxAmmo)
    def hits(self,unit):
        if(unit in self.weaponHits):
            return(True)
        else:
            return(False)
    def replenishAmmo(self):
        self.currentAmmo=self.weaponMaxAmmo
    def decrimentAmmo(self):
        self.currentAmmo =self.currentAmmo - 1 
    def getCurrentAmmo(self):
        return(self.currentAmmo)